﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebShop.DataService;

namespace WebShop.Classes.Auth
{
    /// <summary>
    /// Working with user profile interface
    /// </summary>
    public interface IFormsAuthentication
    {
        /// <summary>
        /// Set, authentificated user fact
        /// </summary>
        /// <param name="userName">Username</param>
        /// <param name="createPersistentCookie">SetCoookie</param>
        void SignIn(string userName, bool createPersistentCookie);

        /// <summary>
        /// Set, that user is logout
        /// </summary>
        void SignOut();

        /// <summary>
        /// Return authentification 
        /// </summary>
        /// <returns>SignIn user info or NULL if not logined</returns>
        User GetInfo();

        /// <summary>
        /// Update logged user data
        /// </summary>
        /// <param name="user">User data</param>
        /// <returns>Updated user data or NULL if error</returns>
        User SetUser(User user);
    }
}